home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / tex / meta27 / mfpandor.lzh / punctr.mf < prev    next >
Text File  |  1990-11-16  |  4KB  |  140 lines

  1. %*****************************************************************************
  2. %        Copyright (c) 1989 by N. N. Billawala
  3. %*****************************************************************************
  4.  
  5.  
  6. % punctr.mf  punctuation: for roman text set
  7.  
  8. % 8 characters
  9.  
  10.  
  11. iff OK "x":  "Cross for Polish l and L";   %******* 1 ACCENT WIDTH  x 20 degrees
  12.   beginchar(oct"040",accent_w*width#+b_mono#,ascender#,0); 
  13.   
  14.   save_num(theta)=max(0,20-.5oblique);                       % angle of the bar
  15.   save_num(thickness)=.5[accent_thin_end,accent_thick_end]*1/cosd theta;
  16.   min_limit(join_radius)(.5thickness);
  17.   bot lft z1l=(0,.4h)//; multpos(1,2)(thickness,90+ if bold:theta else:0 fi);
  18.   rt x2l=lft x1l+w;  z2l=z1l+(whatever,0) rotated theta;
  19.   z0=.5[z1l,z2l]; 
  20.   
  21.   p1=(z0 soften(z2l,z2r,z1r,z1l) z0)--cycle;
  22.  
  23.   showpoints(0,1,2);
  24.  
  25. draw (0,xheight)--(w,xheight);
  26. adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); 
  27. show_character; endchar;
  28.  
  29. % Theta here is the angle of the bar
  30.  
  31.  
  32.  
  33.  
  34. iff OK "'":  "Right quotes or closing quotes"; 
  35.   beginchar(oct"042",accent_w*width#+b_mono#,cap#,0);
  36.   save_num(head)=accent_dot_diameter;
  37.   top z1=(.5head,.75[xheight,cap]-.5head)//;
  38.   top z2=(w-.5head,y1)//;
  39.   ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0);
  40.   ref2=comma(z2,head,min(.6xheight,1.5pt),accent_thin_end,0); 
  41.   p1=ref1 rotatedaround (z1,if prime:prime_angle fi -oblique);
  42.   p2=ref2 rotatedaround (z2,if prime:prime_angle fi -oblique);
  43.   showpoints(1,2);
  44. adjust(v_a*fitbasis.lc#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); 
  45. show_character; endchar;
  46.  
  47.  
  48.  
  49. iff OK "-":  "Hyphen";
  50.   beginchar(oct"055",.33width#+b_mono#,cap#,0); 
  51.   pickup mathpen;
  52.   lft z1=(0,math_axis)//;
  53.   rt z2=lft z1+(w,0);
  54.   draw z1--z2;
  55. adjust(v_f*fitbasis.uc#+m_a*b_mfit#,v_f*fitbasis.uc#+m_a*b_mfit#); 
  56. show_character; endchar;
  57.  
  58. % use different mathpen for softness
  59. % character position, but not shape slants with obliqueness
  60. % must make sure that the plus/minus have the same widths
  61.  
  62.  
  63. % rotation and slant of position with obliqueness
  64. iff OK "`":  "Left quotes or open quotes"; 
  65.   beginchar(oct"134",accent_w*width#+b_mono#,cap#,0);
  66.   save_num(head)=accent_dot_diameter;
  67.   top z1=(.5head,.75[xheight,cap]-.5head-min(.6xheight,2pt))//;
  68.   top z2=(w-.5head,y1)//;
  69.   ref1=comma(z1,head,min(.6xheight,1.5pt),accent_thin_end,0);
  70.   ref2=comma(z2,head,min(.6xheight,1.5pt),accent_thin_end,0);  
  71.   p1=ref1 rotatedaround (z1,180 if prime:prime_angle fi -oblique);
  72.   p2=ref2 rotatedaround (z2,180 if prime:prime_angle fi -oblique);
  73.   showpoints(1,2);
  74. adjust(v_a*fitbasis.lc#+m_a*b_mfit#,v_a*fitbasis.lc#+m_a*b_mfit#); 
  75. show_character; endchar;
  76.  
  77. % rotation and slant of position with obliqueness
  78.  
  79.  
  80.  
  81. iff OK "x":  "Dot accent"; 
  82.   beginchar(oct"137",accent_w*width#+b_mono#,
  83.     accent_height#+xheight#+2/3accent_depth#,0); 
  84.   bot z1=(.5w,h-accent_dot_diameter)//;
  85.   p1=dot.b(z1,accent_dot_diameter);
  86.   showpoints(1);
  87.  
  88. draw (0,xheight)--(w,xheight);
  89. adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); 
  90. show_character; endchar;
  91.  
  92. % no slant of shape with obliqueness
  93.  
  94.  
  95. iff OK "-":  "En-Dash";
  96.   beginchar(oct"173",.5width#+.5mono#,cap#,0); 
  97.   pickup dashpen;
  98.   lft z1=(0,math_axis)//;
  99.   rt z2=lft z1+(w,0);
  100.   draw z1--z2;
  101. adjust(.25mono#,.25mono#); 
  102. show_character; endchar;
  103.  
  104. % use different dashpen for softness
  105. % character position, but not shape slants with obliqueness
  106. % must make sure that the plus/minus have the same widths
  107.  
  108.  
  109. iff OK "-":  "Em-Dash";
  110.   beginchar(oct"174",width#+mono#,cap#,0); 
  111.   pickup dashpen;
  112.   lft z1=(0,math_axis)//;
  113.   rt z2=lft z1+(w,0);
  114.   draw z1--z2;
  115. adjust(0,0); 
  116. show_character; endchar;
  117.  
  118. % use different dashpen for softness
  119. % character position, but not shape slants with obliqueness
  120. % must make sure that the plus/minus have the same widths
  121.        
  122.  
  123.  
  124. iff OK "x":  "Long Hungarian umlaut accent";   
  125.   beginchar(oct"175",.8accent_w*width#+b_mono#,
  126.     accent_height#+xheight#+accent_depth#,0); 
  127.  
  128.   top rt z1=(round(.45w),h)//;  
  129.   bot lft z2=(0,h-max(1,accent_depth))//;
  130.   top rt z3=(w,h)//;  
  131.   bot lft z4=(round(.55w),h-max(1,accent_depth))//;
  132.   p1=prime_accent(z1,z2,accent_thick_end,accent_thin_end);
  133.   p2=prime_accent(z3,z4,accent_thick_end,accent_thin_end);
  134.   showpoints(1,2,3,4);
  135.  
  136. draw (0,xheight)--(w,xheight);
  137. adjust(0+m_a*b_mfit#,0+m_a*b_mfit#); 
  138. show_character; endchar;
  139.  
  140.